from elasticsearch import Elasticsearch
from flask import Blueprint, current_app


bp = Blueprint("api", __name__, url_prefix="/api/es")


@bp.route("/info")
def info():
    es = Elasticsearch([{"host": current_app.config["ES_HOST"]}])
    return es.info()
